<template>
  <div>
    <p>{{ $store.state.arr.filter((item) => item > 50) }}</p>
    <p>{{ $store.getters.newArr }}</p>
    <p>{{ newArr }}</p>
    <p>{{ $store.state.user.username }}</p>
    <p>{{ $store.state.setting.token }}</p>
    <!-- $store.commit('命名空间/key') -->
    <button @click="$store.commit('user/changeName')">按钮</button>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  name: "heima-comp",
  data() {
    return {};
  },
  methods: {},
  computed: {
    ...mapGetters(["newArr"]),
  },
};
</script>

<style scoped></style>
